import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";

@Entity('test_org')
export class OrgEntity {

  @PrimaryGeneratedColumn()
  id: number;

  // 组织名称
  @Column({ name: 'org_name' })
  orgName: string;

  @CreateDateColumn({ name: 'create_time' })
  createTime: string;

  @Column({ select: false, name: 'create_user_id' })
  createUserId: number;

  @UpdateDateColumn({ select: false, name: 'update_time' })
  updateTime: string;

  @Column({ select: false, name: 'update_user_id' })
  updateUserId: number;

  @Column({ name: 'delete_flag' })
  deleteFlag: boolean;

  // 子节点数据
  children: OrgEntity[]
}